package org.hentai.controller;

import org.apache.dubbo.config.annotation.DubboReference;
import org.hentai.dubbo.service.HentaiHelloService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("/")
public class HentaiController {

    @DubboReference
    private HentaiHelloService hentaiHelloService;


    @GetMapping({"/", "/index"})
    public String index(@RequestParam(value = "name", defaultValue = "hentai") String name) {
        return hentaiHelloService.sayHello(name);
//        return "hello hentai";
    }

}
